cmake_minimum_required(VERSION 3.0.2)
project(ultra_band_wave_ladar)

add_compile_options(-std=c++11)

find_package(catkin REQUIRED COMPONENTS
roscpp
serial
std_msgs
sensor_msgs
message_generation)


add_message_files(
  DIRECTORY 
  msg
  FILES
  ObstacleInfo.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)

catkin_package(
  INCLUDE_DIRS include
  CATKIN_DEPENDS roscpp serial std_msgs sensor_msgs geometry_msgs tf message_runtime
)

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)

add_library(sensor_rad_logic src/Sensor_Ultra.cpp src/Sensor_mmRad.cpp)
target_link_libraries(sensor_rad_logic ${catkin_LIBRARIES})

add_executable(sensor_rad_logic_node src/Sensor_RadLogic.cpp)
add_dependencies(sensor_rad_logic_node ${PROJECT_NAME}_generate_messages_cpp)

target_link_libraries(sensor_rad_logic_node sensor_rad_logic ${catkin_LIBRARIES})


add_executable(sensor_listen_node src/Listen_from_motion.cpp)
target_link_libraries(sensor_listen_node ${catkin_LIBRARIES})

add_executable(sensor_talk_node src/Talk_to_motion.cpp)
add_dependencies(sensor_talk_node ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(sensor_talk_node sensor_rad_logic ${catkin_LIBRARIES})
